package com.situ.mall.common.mapper;

import com.situ.mall.common.entity.Product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author membergpf
 * @since 2023-03-20
 */
public interface ProductMapper extends BaseMapper<Product> {

    List<Product> selectName(String name, String version);

    Long maxId();

    void updateByIdL(Integer id);

    void updateUp(Integer[] ids);

    void updateDown(Integer[] ids);

    void updateMore(Integer[] ids);
@Select("select * from product where status='1' and category_id =#{id} order by price limit 0,1 ")
    Product cheap(Integer id);
}
